<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//打印 (0,0), (9,9)的坐标
			
			//
			/* let  x = 0 ;
			while(x<=9){ //控制横坐标
				let y = 0 ;
				while( y<=9){
					document.writeln(`（ ${x} ，${y} ）`)
					y++;
				}
				document.writeln(`<br/>`)
				x++;
			} */
			
			let rows = prompt('请您输入行数', 0);
			let cols = prompt('请您输入列数', 0);
		
			document.write(`<table border='1'>`)
			
			for(let x = 0 ; x <= rows ; x++){
				if(x%2 == 0){
					document.writeln(`<tr style='background-color:gray'>`)
				}else{
					document.writeln(`<tr>`)
				}
				
				for(let y = 0 ; y <= cols; y++ ){
					document.writeln(`<td> （ ${x} ，${y} ）</td>`);
				}
				document.writeln(`</tr>`)
			}
			
			document.write(`</table>`)
		</script>
	</body>
</html>
